﻿@{
    ViewData["Title"] = "Home Page";
}

<div class="text-center">
    <h1 class="display-4">Welcome</h1>
    <p>Checkout our books recommendation for today</p>
    <div>
        <p class="text-left" >
            <a asp-controller="Home" asp-action="GetPDFPriceList" class="btn btn-danger" > Get pricelist as pdf &nbsp;&nbsp;&nbsp;&nbsp;<img src="~/images/istockphoto-1156672386-612x612.jpg" height="40" width="40" class="rounded" /></a>
            <a asp-controller="Home" asp-action="pricelist.xlsx" class="btn btn-outline-success" > Get pricelist as Excel file &nbsp;&nbsp;&nbsp;&nbsp;<img src="~/images/xls-icon.png" height="40" width="40" class="rounded" /></a>
        </p>
    </div>
    <div class="align-self-lg-start">
        @{

            using (ApplicationContext db = new ApplicationContext())
            {
                foreach (var b in db.Books.ToList())
                {
                    <br />
                    <p class="text-left"> <a asp-action="BookView" asp-route-id="@b.Id"> @b.Author - @b.Alias</a> <a asp-action="Edit" asp-route-id="@b.Id">| Edit</a></p>
                }
            }
        }
    </div>
    <div>

    </div>
</div>
